﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ACLibs.DBHelper.MSSQL
{
    /// <summary>
    /// 公共变量
    /// </summary>
    public class MSSQLGConf
    {
        /// <summary>
        /// 数据库是否初始化
        /// </summary>
        public static bool Init { get; set; } = false;

        /// <summary>
        /// 数据库连接字符串对象
        /// </summary>
        internal static SqlConnectionStringBuilder ConnString { get; set; } = new SqlConnectionStringBuilder();

        /// <summary>
        /// 获取或设置数据库连接状态
        /// </summary>
        public static ConnectionState ConnState { get; set; } = ConnectionState.Closed;

        /// <summary>
        /// 获取或设置数据库连接错误信息
        /// </summary>
        public static string ConnMessage { get; set; } = "";

        /// <summary>
        /// 公共数据库连接对象
        /// </summary>
        internal static SqlConnection GConn { get; set; }
    }
}
